package sartoservicesync.utils;

import sartoservicesync.entities.presta.PrestaCategory;
import sartoservicesync.entities.presta.PrestaCustomer;
import sartoservicesync.entities.presta.PrestaProduct;

/**
 * Created by waldemar.lammert on 17.06.2014.
 */
public enum PrestaWebservice {

	EMPTY_TAG(getAccessKey(),"tags?schema=blank","Tagvorlage"),
	CREATE_TAG(getAccessKey(),"tags","Tagvorlage"),
    PRODUCTS_LIST(getAccessKey(),"products?display=["+PrestaProduct.FIELDS+"]","Produkte"),
    CATEGORIES_LIST(getAccessKey(),"categories?display=["+PrestaCategory.FIELDS+"]","Kategorien"),
    CUSTOMERS_LIST(getAccessKey(),"customers?display=["+PrestaCustomer.FIELDS+"]","Kunden"),
    EMPTY_CUSTOMER(getAccessKey(),"customers?schema=blank","Kundenvorlage"),
    CREATE_CUSTOMER(getAccessKey(),"customers","Kundenvorlage"),
    RAKUTEN_CUSTOMER(getAccessKey(),"customers?display=["+PrestaCustomer.FIELDS+
    		"]&filter[firstname]=["+PrestaConstants.RAKUTEN_CUSTOMER_FIRSTNAME.toString()+
    		"]&filter[lastname]=["+PrestaConstants.RAKUTEN_CUSTOMER_LASTNAME.toString()+
    		"]","Rakuten-Kundenaccount");
    
    private final String SHOPADDRESS="http://www.bienenkorb-shop.de/api";
    private final static String PRESTA_READ_ACCESS_KEY="K3FUTSILDRP8AC5QD27I1RAJSG9AHOT7";
    
    private String key;
    private String url;
    private String entityName;

    private PrestaWebservice(String key, String url, String entityName){
        this.key = key;
        this.url = url;
        this.entityName=entityName;
    }


	private static String getAccessKey() {
		return PRESTA_READ_ACCESS_KEY;
	}

	public String getKey(){
        return key;
    }

    public String getUrl(){
        return SHOPADDRESS+"/"+url;
    }

	public String getEntityName() {
		return entityName;
		
	}
    

}
